//
//  FriendDynamiCell.m
//  Connections
//
//  Created by beisheng03 on 2017/10/11.
//  Copyright © 2017年 beisheng. All rights reserved.
//

#import "FriendDynamiCell.h"

@interface FriendDynamiCell ()

@property (weak, nonatomic) IBOutlet UIImageView *userImage;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomMargin;
@property (weak, nonatomic) IBOutlet UILabel *nikNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstWorkLabel;
@property (weak, nonatomic) IBOutlet UILabel *sendWorkLabel;
@property (weak, nonatomic) IBOutlet UILabel *contenLabel;
@property (weak, nonatomic) IBOutlet UICollectionView *imagesShowView;
@property (weak, nonatomic) IBOutlet UIView *commentBgView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *colloctionH;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *colloctionW;
@property (weak, nonatomic) IBOutlet UILabel *zanTextLabel;
@property (weak, nonatomic) IBOutlet UIView *lineView;

@end

@implementation FriendDynamiCell

- (void)setIndex:(NSIndexPath *)index{
    _index = index;
 
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.contentView.backgroundColor = [UIColor whiteColor];
    self.zanTextLabel.text = nil;
    self.zanTextLabel.font = [UIFont systemFontOfSize:9];
    self.userImage.image = [UIImage defaulIconImage];
    self.userImage.layer.masksToBounds = YES;
    self.userImage.layer.cornerRadius = 20;
    self.colloctionH.constant = 0;
    self.colloctionW.constant = 0;
    self.lineView.backgroundColor = lineGray;
    self.bottomMargin.constant = -45;
    self.firstWorkLabel.textColor = lighGray;
    self.nikNameLabel.textColor = dakGray;
    self.sendWorkLabel.textColor = lighGray;
    
    self.firstWorkLabel.layer.borderColor = lighGray.CGColor;
    self.firstWorkLabel.layer.borderWidth = 0.6;
    self.firstWorkLabel.layer.cornerRadius = 8;
    self.sendWorkLabel.layer.borderColor = lighGray.CGColor;
    self.sendWorkLabel.layer.borderWidth = 0.6;
    self.sendWorkLabel.layer.cornerRadius = 8;

    
    for (int i = 0; i < self.commentBgView.subviews.count ; i++) {
        UILabel *temp = (UILabel *)self.commentBgView.subviews[i];
        
        temp.text = nil;
        
        
        //        if (i <= index.row) {
        //
        //            temp.text = [NSString stringWithFormat:@"第%d条评论",i];
        //
        //        }
        
    }
    // Initialization code
}

- (IBAction)btnDidTap:(UIButton *)sender {
    
    if ([self.delegate respondsToSelector:@selector(commentBtnDidClick)]) {
        [self.delegate commentBtnDidClick];
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
